<!doctype html>
<html lang="zh-CN">
<head>
    <!-- 必须的 meta 标签 -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap 的 CSS 文件 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

    <title>Hello, world!</title>
</head>
<body>
<div class="container">
    <header class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
        <a href="/" class="d-flex align-items-center col-md-3 mb-2 mb-md-0 text-dark text-decoration-none">
            Index
        </a>

        {if not $username}
        <div class="col-md-3 text-end">
            <a href="/login" class="btn btn-outline-primary me-2">Login</a>
            <a href="/register" class="btn btn-primary">Sign-up</a>
        </div>
        {else}
        <a href="/user" class="">{$username}</a>
        {/if}

    </header>
    <h1> Welcome{if $username}{sprintf(", %s", $username)}{/if}! </h1>
    <div>
        <h3>项目源码：</h3>
        项目地址：<a href="https://gitee.com/chen2366/mvcframework.git">https://gitee.com/chen2366/mvcframework.git</a>
        <br>
        框架地址：<a href="https://gitee.com/chen2366/mvccore.git">https://gitee.com/chen2366/mvccore.git</a>
        <br>

        <h3>路由</h3>
        <ul>
            <li>1. 动态路由, 控制器 TestController@echo <a href="/test/echo">/test/echo</a></li>
            <li>2. 具名路由, 控制器 IndexController@index <a href="/test/echo2">/test/echo2</a></li>
        </ul>
    </div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
</body>
</html>